<?php 
	session_start();
	include("../write_functions/write_functions.php");
	include("checkSchool.php");
	
	if($clean){
		connect('localhost','root','','gradegriddatabase');
		modifyschool($_GET['school_id'],
					 $_POST['school'],
					 $_POST['college'],
					 $_POST['dept'],
					 $_POST['pres'],
					 $_POST['prin'],
					 $_POST['dean'],
					 $_POST['colSec'],
					 $_POST['deptChair'],
					 $_POST['country'],
					 $_POST['zip'],
					 $_POST['city'],
					 $_POST['municipality'],
					 $_POST['street'],
					 $_POST['desc'],
					 $_POST['num1'],
					 $_POST['num2'],
					 $_POST['num3']);
	mysql_close();
?>			 
	<head><title>GradeGrid - School Modification Success</title></head>
	<body>
		<div style="position:absolute; top:-60px; margin-top:50%; left:-163px; margin-left:50%;">
            <h3 align="center">The school had been edited successfully!<br/>What would you like to do?</h3>
            <div align="center">
                <a href="addSchool.php">Add a new school</a>
                 OR 
                <a id="close" onClick="window.close()" style="text-decoration:underline; color:#03F" onMouseOver="document.getElementById('close').style.cursor='pointer'">Close this window</a>
            </div>
		</div>
		<div style="font-size:9px; position:absolute; bottom:10px; left:-40px; margin-left:50%;" align="center">GradeGrid Copyright</div>
	</body>
<?php
	} else {
		echo $error;
		echo "<br/><a id=\"close\" onClick=\"history.back()\" style=\"text-decoration:underline; color:#03F\" onMouseOver=\"document.getElementById('close').style.cursor='pointer'\">Click here to return to your form</a></div>";
	}
?>